<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>当前联赛情况</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="./src/ico.ico">
    <link rel="apple-touch-icon-precomposed" href="./src/ico.ico">
    <link rel="stylesheet" href="assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="assets/css/admin.css">
    <link rel="stylesheet" href="assets/css/app.css">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <link rel="stylesheet" href="./css/footable.core.css">
    <link rel="stylesheet" href="./css/clock.css">
    <style>
        .table>tbody>tr>td,
        .table>tbody>tr>th,
        .table>tfoot>tr>td,
        .table>tfoot>tr>th,
        .table>thead>tr>td,
        .table>thead>tr>th {
            padding: 2px;
            vertical-align: middle;
            text-align: center;
        }

        * {
            transition-duration: 0.2s;
        }

        .demoItem {
            position: relative;
            width: 100px;
            height: 20px;
            margin: 10px 20px;
            border: 1px solid rgba(255, 255, 255, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .animation1 .shape {
            display: inline-block;
            margin: 0 5px;
            width: 10px;
            height: 10px;
            opacity: 0.5;
        }

        .animation1 .shape-1 {
            background-color: #1875E5;
            animation: AnimationShape1 1.5s ease infinite;
        }

        .animation1 .shape-2 {
            background-color: #C5523F;
            animation: AnimationShape1 1.5s ease infinite 0.5s;
        }

        .animation1 .shape-3 {
            background-color: #499255;
            animation: AnimationShape1 1.5s ease infinite 0.8s;
        }

        .animation1 .shape-4 {
            background-color: #F2B736;
            animation: AnimationShape1 1.5s ease infinite 1s;
        }

        @keyframes AnimationShape1 {
            0% {
                transfrom: scale(1);
                opacity: 0.5;
            }

            50% {
                transform: scale(1.5);
                opacity: 1;
            }

            100% {
                transfrom: scale(0.5);
                opacity: 0.5;
            }
        }

        /* animation2 */
        .animation2 .con {
            width: 30px;
            height: 30px;
            position: relative;
        }

        .animation2 .shape {
            position: absolute;
            width: 10px;
            height: 10px;
            display: inline-block;
            border-radius: 50%;
            top: 40%;
        }

        .animation2 .shape-1 {
            background-color: #1875E5;
            animation: AnimationShape2 1s ease infinite;
        }

        .animation2 .shape-2 {

            left: 10px;
            background-color: #C5523F;
        }

        .animation2 .shape-3 {
            left: 20px;
            background-color: #499255;
        }

        .animation2 .shape-4 {
            background-color: #F2B736;
            left: 30px;
            animation: AnimationShape3 1s ease infinite;
        }

        @keyframes AnimationShape2 {
            0% {
                left: -15px;
                top: 5px;
            }

            25% {
                left: 0;
                top: 40%;
            }

            50% {
                left: 0;
                top: 40%;
            }

            75% {
                left: 0;
                top: 40%;
            }

            100% {
                left: -15px;
                top: 5px;
            }
        }

        @keyframes AnimationShape3 {
            0% {
                left: 30px;
                top: 40%;
            }

            25% {
                left: 30px;
                top: 40%;
            }

            50% {
                left: 45px;
                top: 5px;
            }

            75% {
                left: 30px;
                top: 40%;
            }

            100% {
                left: 30px;
                top: 40%;
            }
        }
    </style>
</head>

<body data-type="generalComponents" style="background: #e9ecf3;">


    <header class="am-topbar am-topbar-inverse admin-header">
        <div class="am-topbar-brand">
            <a href="javascript:;" class="tpl-logo">
                <img src="./src/ico.ico" alt="" class="catImg">
            </a>
        </div>
        <div class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right">

        </div>

        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
            data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span
                class="am-icon-bars"></span></button>

        <div class="am-collapse am-topbar-collapse" id="topbar-collapse">

            <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="am-icon-bell-o"></span> 提醒 <span
                            class="am-badge tpl-badge-success am-round">0</span></span>
                    </a>
                    <!-- <ul class="am-dropdown-content tpl-dropdown-content">
                                <li class="tpl-dropdown-content-external">
                                    <h3>你有 <span class="tpl-color-success">5</span> 条提醒</h3><a href="###">全部</a>
                                </li>
                                <li class="tpl-dropdown-list-bdbc"><a href="#" class="tpl-dropdown-list-fl"><span
                                            class="am-icon-btn am-icon-plus tpl-dropdown-ico-btn-size tpl-badge-success"></span>
                                        【预览模块】移动端 查看时 手机、电脑框隐藏。</a>
                                    <span class="tpl-dropdown-list-fr">3小时前</span>
                                </li>
                                <li class="tpl-dropdown-list-bdbc"><a href="#" class="tpl-dropdown-list-fl"><span
                                            class="am-icon-btn am-icon-check tpl-dropdown-ico-btn-size tpl-badge-danger"></span>
                                        移动端，导航条下边距处理</a>
                                    <span class="tpl-dropdown-list-fr">15分钟前</span>
                                </li>
                                <li class="tpl-dropdown-list-bdbc"><a href="#" class="tpl-dropdown-list-fl"><span
                                            class="am-icon-btn am-icon-bell-o tpl-dropdown-ico-btn-size tpl-badge-warning"></span>
                                        追加统计代码</a>
                                    <span class="tpl-dropdown-list-fr">2天前</span>
                                </li>
                            </ul> -->
                </li>
                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="am-icon-comment-o"></span> 消息 <span
                            class="am-badge tpl-badge-danger am-round">0</span></span>
                    </a>
                    <!-- <ul class="am-dropdown-content tpl-dropdown-content">
                                <li class="tpl-dropdown-content-external">
                                    <h3>你有 <span class="tpl-color-danger">9</span> 条新消息</h3><a href="###">全部</a>
                                </li>
                                <li>
                                    <a href="#" class="tpl-dropdown-content-message">
                                        <span class="tpl-dropdown-content-photo">
                                            <img src="assets/img/user02.png" alt=""> </span>
                                        <span class="tpl-dropdown-content-subject">
                                            <span class="tpl-dropdown-content-from"> 小早苗 </span>
                                            <span class="tpl-dropdown-content-time">10分钟前 </span>
                                        </span>
                                        <span class="tpl-dropdown-content-font"> Amaze UI 的诞生，依托于 GitHub 及其他技术社区上一些优秀的资源；Amaze
                                            UI 的成长，则离不开用户的支持。 </span>
                                    </a>
                                    <a href="#" class="tpl-dropdown-content-message">
                                        <span class="tpl-dropdown-content-photo">
                                            <img src="assets/img/user03.png" alt=""> </span>
                                        <span class="tpl-dropdown-content-subject">
                                            <span class="tpl-dropdown-content-from"> Steam </span>
                                            <span class="tpl-dropdown-content-time">18分钟前</span>
                                        </span>
                                        <span class="tpl-dropdown-content-font"> 为了能最准确的传达所描述的问题， 建议你在反馈时附上演示，方便我们理解。 </span>
                                    </a>
                                </li>
        
                            </ul> -->
                </li>
                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="am-icon-calendar"></span> 进度 <span
                            class="am-badge tpl-badge-primary am-round">0</span></span>
                    </a>
                    <ul class="am-dropdown-content tpl-dropdown-content">
                        <li class="tpl-dropdown-content-external">
                            <h3>你有 <span class="tpl-color-primary">0</span> 个任务进度</h3><a href="###">全部</a>
                        </li>
                        <li>
                            <a href="javascript:;" class="tpl-dropdown-content-progress">
                                <span class="task">
                                    <span class="desc">v1.2 </span>
                                    <span class="percent">45%</span>
                                </span>
                                <span class="progress">
                                    <div class="am-progress tpl-progress am-progress-striped">
                                        <div class="am-progress-bar am-progress-bar-success" style="width:45%"></div>
                                    </div>
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:;" class="tpl-dropdown-content-progress">
                                <span class="task">
                                    <span class="desc">新闻内容页 </span>
                                    <span class="percent">30%</span>
                                </span>
                                <span class="progress">
                                    <div class="am-progress tpl-progress am-progress-striped">
                                        <div class="am-progress-bar am-progress-bar-secondary" style="width:30%"></div>
                                    </div>
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:;" class="tpl-dropdown-content-progress">
                                <span class="task">
                                    <span class="desc">管理中心 </span>
                                    <span class="percent">60%</span>
                                </span>
                                <span class="progress">
                                    <div class="am-progress tpl-progress am-progress-striped">
                                        <div class="am-progress-bar am-progress-bar-warning" style="width:60%"></div>
                                    </div>
                                </span>
                            </a>
                        </li>

                    </ul>
                </li>

                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="tpl-header-list-user-nick">小早苗</span><span class="tpl-header-list-user-ico"> <img
                                src="./src/ico.ico"></span>
                    </a>
                    <ul class="am-dropdown-content">
                        <li><a href="#"><span class="am-icon-bell-o"></span> 资料</a></li>
                        <li><a href="#"><span class="am-icon-cog"></span> 设置</a></li>
                        <li><a href="#"><span class="am-icon-power-off"></span> 退出</a></li>
                    </ul>
                </li>
                <li><a href="###" class="tpl-header-list-link"><span
                            class="am-icon-sign-out tpl-header-list-ico-out-size"></span></a></li>
            </ul>
        </div>
    </header>







    <div class="tpl-page-container tpl-page-header-fixed">


        <div class="tpl-left-nav tpl-left-nav-hover">
            <div class="tpl-left-nav-title">
                列表
            </div>
            <div class="tpl-left-nav-list">
                <ul class="tpl-left-nav-menu">
                    <li class="tpl-left-nav-item">
                        <a href="index.html" class="nav-link">
                            <i class="am-icon-home"></i>
                            <span>首页</span>
                        </a>
                    </li>
                    <li class="tpl-left-nav-item">
                        <a href="peopleList.html" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-bar-chart"></i>
                            <span>各部成员</span>
                            <!-- <i class="tpl-left-nav-content tpl-badge-danger">
                                        12
                                    </i> -->
                        </a>
                    </li>

                    <li class="tpl-left-nav-item">
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-table"></i>
                            <span>部落战</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu" style="display: none;">
                            <li>
                                <a href="currentwar.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>当前部落战情况</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>

                                <a href="warlog.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>历史部落战统计</span>

                                </a>
                            </li>
                        </ul>
                    </li>

                    <li class="tpl-left-nav-item">
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list active">
                            <i class="am-icon-wpforms"></i>
                            <span>联赛</span>
                            <i
                                class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu" style="display: block;">
                            <li>
                                <a href="./leaguegroup.html" class="active">
                                    <i class="am-icon-angle-right"></i>
                                    <span>当前联赛情况</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>

                                <a href="./leaguegroupLog.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>历史联赛统计</span>
                                </a>
                            </li>
                        </ul>
                    </li>

                    <!-- <li class="tpl-left-nav-item">
                        <a href="login.html" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-key"></i>
                            <span>登录</span>

                        </a>
                    </li> -->
                </ul>
            </div>
        </div>





        <div class="tpl-content-wrapper">
            <div class="clock">
                <!-- 表盘 -->
                <div class="board">
                    <div></div>
                </div>
                <div class="number"></div>
                <div class="pointers">
                    <div class="h"></div>
                    <div class="m"></div>
                    <div class="s"></div>
                </div>
                <div class="dot"></div>
            </div>
            <div class="tpl-content-page-title">
                当前联赛情况
            </div>
            <ol class="am-breadcrumb">
                <li><a href="#" class="am-icon-home">首页</a></li>
                <li><a href="#">联赛</a></li>
                <li class="am-active">当前联赛情况</li>
            </ol>
            <div class="tpl-portlet-components">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span> Bigcat-联赛组当前情况
                    </div>
                    <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input input-small input-inline">
                            <div class="input-icon right">
                                <select class="form-control myOptionWarTag"></select>
                            </div>
                        </div>


                    </div>
                </div>

                <div class="tpl-block">

                    <div class="wrapper wrapper-content animated fadeInRight m-t-none" style="height: auto;">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <table class="footable table table-stripped table-bordered table-hover"
                                        data-page-size="50" data-filter="filter">
                                        <thead>
                                            <tr>
                                                <th>部落</th>
                                                <th>状态</th>
                                                <th>规模</th>
                                                <th class="warTime">结束时间</th>
                                                <th>已进攻次数</th>
                                                <th>星数</th>
                                                <th>摧毁率</th>
                                            </tr>
                                        </thead>
                                        <tbody class="myTable-warState"></tbody>
                                        <tfoot>
                                            <tr>
                                                <td colspan="7">
                                                    <ul class="pagination pull-right"></ul>
                                                </td>
                                            </tr>
                                        </tfoot>

                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="wrapper wrapper-content animated fadeInRight m-t-none" style="height: auto;">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <table class="footable table table-stripped table-bordered table-hover"
                                        data-page-size="50" data-filter="filter">
                                        <thead>
                                            <tr>
                                                <th>排名</th>
                                                <th>人员</th>
                                                <th>市政厅</th>
                                                <th>进攻</th>
                                                <th>次序</th>
                                                <th>防御</th>
                                            </tr>
                                        </thead>
                                        <tbody class="myTable-warContent"></tbody>
                                        <tfoot>
                                            <tr>
                                                <td colspan="6">
                                                    <ul class="pagination pull-right"></ul>
                                                </td>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <div class="tpl-portlet-components">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span> Bigcat Ⅱ-联赛组当前情况
                    </div>
                    <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input input-small input-inline">
                            <div class="input-icon right">
                                <select class="form-control myOptionWarTag2"></select>
                            </div>
                        </div>
                    </div>


                </div>

                <div class="tpl-block">

                    <div class="wrapper wrapper-content animated fadeInRight m-t-none" style="height: auto;">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <table class="footable table table-stripped table-bordered table-hover"
                                        data-page-size="50" data-filter="filter">
                                        <thead>
                                            <tr>
                                                <th>部落</th>
                                                <th>状态</th>
                                                <th>规模</th>
                                                <th class="warTime2">结束时间</th>
                                                <th>已进攻次数</th>
                                                <th>星数</th>
                                                <th>摧毁率</th>
                                            </tr>
                                        </thead>
                                        <tbody class="myTable-warState2"></tbody>
                                        <tfoot>
                                            <tr>
                                                <td colspan="7">
                                                    <ul class="pagination pull-right"></ul>
                                                </td>
                                            </tr>
                                        </tfoot>

                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="wrapper wrapper-content animated fadeInRight m-t-none" style="height: auto;">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <table class="footable table table-stripped table-bordered table-hover"
                                        data-page-size="50" data-filter="filter">
                                        <thead>
                                            <tr>
                                                <th>排名</th>
                                                <th>人员</th>
                                                <th>市政厅</th>
                                                <th>第一次进攻</th>
                                                <th>次序</th>
                                                <th>防御</th>
                                            </tr>
                                        </thead>
                                        <tbody class="myTable-warContent2"></tbody>
                                        <tfoot>
                                            <tr>
                                                <td colspan="6">
                                                    <ul class="pagination pull-right"></ul>
                                                </td>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="tpl-portlet-components">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span> Bigcat Ⅲ-联赛组当前情况
                    </div>
                    <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input input-small input-inline">
                            <div class="input-icon right">
                                <select class="form-control myOptionWarTag3"></select>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="tpl-block">

                    <div class="wrapper wrapper-content animated fadeInRight m-t-none" style="height: auto;">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <table class="footable table table-stripped table-bordered table-hover"
                                        data-page-size="50" data-filter="filter">
                                        <thead>
                                            <tr>
                                                <th>部落</th>
                                                <th>状态</th>
                                                <th>规模</th>
                                                <th class="warTime3">结束时间</th>
                                                <th>已进攻次数</th>
                                                <th>星数</th>
                                                <th>摧毁率</th>
                                            </tr>
                                        </thead>
                                        <tbody class="myTable-warState3"></tbody>
                                        <tfoot>
                                            <tr>
                                                <td colspan="7">
                                                    <ul class="pagination pull-right"></ul>
                                                </td>
                                            </tr>
                                        </tfoot>

                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="wrapper wrapper-content animated fadeInRight m-t-none" style="height: auto;">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <table class="footable table table-stripped table-bordered table-hover"
                                        data-page-size="50" data-filter="filter">
                                        <thead>
                                            <tr>
                                                <th>排名</th>
                                                <th>人员</th>
                                                <th>市政厅</th>
                                                <th>第一次进攻</th>
                                                <th>次序</th>
                                                <th>防御</th>
                                            </tr>
                                        </thead>
                                        <tbody class="myTable-warContent3"></tbody>
                                        <tfoot>
                                            <tr>
                                                <td colspan="6">
                                                    <ul class="pagination pull-right"></ul>
                                                </td>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="tpl-portlet-components">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span> 树海之森-联赛组当前情况
                    </div>
                    <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input input-small input-inline">
                            <div class="input-icon right">
                                <select class="form-control myOptionWarTag4"></select>
                            </div>
                        </div>
                    </div>


                </div>

                <div class="tpl-block">

                    <div class="wrapper wrapper-content animated fadeInRight m-t-none" style="height: auto;">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <table class="footable table table-stripped table-bordered table-hover"
                                        data-page-size="50" data-filter="filter">
                                        <thead>
                                            <tr>
                                                <th>部落</th>
                                                <th>状态</th>
                                                <th>规模</th>
                                                <th class="warTime4">结束时间</th>
                                                <th>已进攻次数</th>
                                                <th>星数</th>
                                                <th>摧毁率</th>
                                            </tr>
                                        </thead>
                                        <tbody class="myTable-warState4"></tbody>
                                        <tfoot>
                                            <tr>
                                                <td colspan="7">
                                                    <ul class="pagination pull-right"></ul>
                                                </td>
                                            </tr>
                                        </tfoot>

                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="wrapper wrapper-content animated fadeInRight m-t-none" style="height: auto;">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <table class="footable table table-stripped table-bordered table-hover"
                                        data-page-size="50" data-filter="filter">
                                        <thead>
                                            <tr>
                                                <th>排名</th>
                                                <th>人员</th>
                                                <th>市政厅</th>
                                                <th>第一次进攻</th>
                                                <th>次序</th>
                                                <th>防御</th>
                                            </tr>
                                        </thead>
                                        <tbody class="myTable-warContent4"></tbody>
                                        <tfoot>
                                            <tr>
                                                <td colspan="6">
                                                    <ul class="pagination pull-right"></ul>
                                                </td>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <script src="./js/forRange.js"></script>
    <script src="assets/js/amazeui.min.js"></script>
    <script src="assets/js/app.js"></script>
    <script src="./js/bootstrap.min.js"></script>
    <script src="./js/key.js"></script>

    <script>
        $('.catImg').on('click', function () {
            $('.tpl-content-wrapper').hasClass('tpl-content-wrapper-hover') ? $('.tpl-content-wrapper').removeClass('tpl-content-wrapper-hover') + $('.tpl-left-nav').css({ display: 'block' }) : $('.tpl-content-wrapper').addClass('tpl-content-wrapper-hover') + $('.tpl-left-nav').css({ display: 'none' });
        })
    </script>
    <script>
        var myAllUrl = allUrl + 'getLeaguegroup.php?tag=';//调用地址
        range(myAllUrl, $('.myTable-warState').eq(0), $('.myTable-warContent').eq(0), $('.warTime'), $('.myOptionWarTag'), '8CRUGCRU');
        range(myAllUrl, $('.myTable-warState2').eq(0), $('.myTable-warContent2').eq(0), $('.warTime2'), $('.myOptionWarTag2'), '28YOOP9V2');
        range(myAllUrl, $('.myTable-warState3').eq(0), $('.myTable-warContent3').eq(0), $('.warTime3'), $('.myOptionWarTag3'), '28U9CQCQU');
        range(myAllUrl, $('.myTable-warState4').eq(0), $('.myTable-warContent4').eq(0), $('.warTime4'), $('.myOptionWarTag4'), '289J0JRJV');
        function range(myurl, TableWarState, TableWarContent, warTime, myOptionWarTag, clanTag) {
            var myTableWarState = TableWarState;//对战状态表
            var myTableWarContent = TableWarContent;//对战详情表
            getWarDataAjax(myurl + clanTag, getMessage);//第一次请求，进页面直接获取，拿到所有warTag

            function getMessage(datas) {//获取联赛信息，拿到每场对战的标签，用于重新获取那场战斗
                var data = JSON.parse(datas);
                console.log(data);
                var rounds = data.rounds;//所有场次
                var warTagArr = [];
                myOptionWarTagStr = '';
                rounds.forEach(function (ele, index) {
                    ele.warTags.forEach(function (ele2, index2) {
                        myOptionWarTag.get(0).innerHTML += '<option>第' + (index + 1) + '场 ' + ele2 + '</option>';
                    })
                })
                myOptionWarTag.trigger('input');//主动触发一次input事件
            }

            myOptionWarTag.on('input', function () {//给每个input绑定事件
                var warTag = this.value.split('#')[1];
                console.log(warTag);
                getWarDataAjax(allUrl + 'getLeagueWarData.php?tag=' + warTag, getWarData);
            })

            function getWarData(datas) {
                var data = JSON.parse(datas);
                var strWarState = '';
                console.log(data);
                var dataClan = data.clan;//左方所有信息
                var dataOpponent = data.opponent;//右方所有信息
                data.opponent.name.indexOf('Bigcat') != -1 || data.opponent.name.indexOf('树海之森') != -1 ? (dataClan = data.opponent) + (dataOpponent = data.clan) : 0;//如果是我方部落，就把它排在左方
                var clan = dataClan.name, state, teamSize = data.teamSize, time, attacksDif, stars = dataClan.stars, destructionPercentage = parseFloat(dataClan.destructionPercentage).toFixed(3);
                data.state == 'inWar' ? state = '战斗中' : state = '准备日';//区分是否处于战时
                data.state == 'inWar' ? time = changeTime(data.endTime) : time = changeTime(data.startTime);//针对是否在战时更改表头内容
                data.state == 'inWar' ? warTime.html('结束时间') : warTime.html('开始时间');//更改表头样式
                data.state == 'warEnded' ? state = '战斗结束' : 0;
                data.state == 'warEnded' ? warTime.html('已结束') : 0;
                attacksDif = dataClan.attacks;//我方已进攻次数
                strWarState += '<tr class="gradeA footable-odd"><td><img src="' + dataClan.badgeUrls.small + '" style="width:17px;"></img> ' + clan + '</td><td>' + state + '</td><td>' + teamSize + '人</td><td>' + time + '</td><td>' + attacksDif + '</td><td>' + stars + '</td><td>' + destructionPercentage + '%</td></tr>';
                var opponentClan = dataOpponent.name, opponentAttacksDif, opponentStars = dataOpponent.stars, opponentDestructionPercentage = parseFloat(dataOpponent.destructionPercentage).toFixed(3);
                opponentAttacksDif = dataOpponent.attacks;//敌方已进攻次数
                strWarState += '<tr class="gradeA footable-odd"><td><img src="' + dataOpponent.badgeUrls.small + '" style="width:17px;"></img> ' + opponentClan + '</td><td>' + state + '</td><td>' + teamSize + '人</td><td>' + time + '</td><td>' + opponentAttacksDif + '</td><td>' + opponentStars + '</td><td>' + opponentDestructionPercentage + '%</td></tr>';
                myTableWarState.html(strWarState);//向对战状态区域插入文本
                //以上为部落战状态表--- -以下为部落战详细表
                dataClan.members.sort(function (a, b) { return a['mapPosition'] - b['mapPosition'] });//根据部落战位置排序
                var opponentMembersArr = dataOpponent.members;//敌方所有参战成员信息数组
                var opponentMembersObj = {};
                opponentMembersArr.forEach(function (ele, index) {//筛选出敌方成员标签与大本级别的映射
                    opponentMembersObj[ele.tag] = ele.townhallLevel;
                })
                var strWarContent = '';
                dataClan.members.forEach(function (ele, index) {//把参战成员的信息筛选出来
                    var stars1, destructionPercentage1, order1, bestOpponentAttack, defenderTagLevel1;
                    var attacks = ele.attacks;
                    var str1;//进攻结果的字符
                    if (!ele.attacks && !ele.bestOpponentAttack) {
                        return;
                    }
                    if (ele.attacks) {//如果有一次进攻
                        stars1 = attacks[0].stars;//第一次进攻的星数
                        destructionPercentage1 = attacks[0].destructionPercentage;//第一次进攻的摧毁率
                        order1 = attacks[0].order;//第一次进攻的次序
                        defenderTagLevel1 = opponentMembersObj[attacks[0].defenderTag];//第一次进攻的敌方大本级别
                        str1 = defenderTagLevel1 + '本' + stars1 + '星' + destructionPercentage1 + '%';
                    } else {//一次也没打的时候
                        str1 = '';//置空，避免下面变颜色时indexOf报错
                        order1 = '';//置空，避免下面变颜色时indexOf报错
                    }
                    var strBestOpponentAttack;//防御结果的字符
                    if (!ele.bestOpponentAttack) {
                        strBestOpponentAttack = '';
                    } else {
                        strBestOpponentAttack = ele.bestOpponentAttack.stars + '星' + ele.bestOpponentAttack.destructionPercentage + '%';
                    }
                    if (index % 2 == 0) {//区分奇偶行
                        strWarContent += '<tr class="gradeA footable-odd"><td>' + ele.mapPosition + '</td><td>' + ele.name + '</td><td>' + ele.townhallLevel + '本</td><td class="attacks1">' + str1 + '</td><td>' + order1 + '</td><td>' + strBestOpponentAttack + '</td></tr>';
                    } else {
                        strWarContent += '<tr class="gradeA footable-even"><td>' + ele.mapPosition + '</td><td>' + ele.name + '</td><td>' + ele.townhallLevel + '本</td><td class="attacks1">' + str1 + '</td><td>' + order1 + '</td><td>' + strBestOpponentAttack + '</td></tr>';
                    }
                })
                myTableWarContent.html(strWarContent);//向对战信息区域插入文本
                var arrAttacks = $('.attacks1');//选出所有进攻栏目的td
                for (var i = 0; i < arrAttacks.length; i++) {//筛选出1星变红，3星变蓝
                    var str = arrAttacks[i].innerHTML;
                    if (str != '') {
                        var arr = str.split('星');
                        var arr1 = arr[0].split('本');
                        arr1[1].indexOf('1') != -1 || arr1[1].indexOf('0') != -1 ? $(arrAttacks[i]).css({ backgroundColor: '#f40' }) : 0;
                        arr1[1].indexOf('3') != -1 ? $(arrAttacks[i]).css({ backgroundColor: '#4489e8' }).html($(arrAttacks[i]).html() + '<i class="fa fa-thumbs-up" aria-hidden="true"></i>') : 0;
                    }
                }
            }

            function getWarDataAjax(myurl, success) {
                $.ajax({
                    url: myurl,
                    type: 'GET',
                    success: success,
                    error: myerror,
                    beforeSend: mybeforeSend,
                })
            }

            function myerror() {
                console.log(e.status, e.statusText);//状态码和信息
                myTableWarState.html('失败，请尝试刷新..............');
                myTableWarContent.html('失败，请尝试刷新..............');
            }

            function mybeforeSend() {
                myTableWarState.html('<div class="demoItem animation2"><div class="con"><div class="shape shape-1"></div><div class="shape shape-2"></div><div class="shape shape-3"></div><div class="shape shape-4"></div></div></div>');
                myTableWarContent.html('<div class="demoItem animation2"><div class="con"><div class="shape shape-1"></div><div class="shape shape-2"></div><div class="shape shape-3"></div><div class="shape shape-4"></div></div></div>');
            }

            function changeTime(time) {//把获取的时间分割好，并转为东八区
                var str = time;
                var year = str.slice(0, 4);
                var mon = str.slice(4, 6);
                var data = str.slice(6, 8);
                var hour = parseInt(str.slice(9, 11)) + 8;
                var min = str.slice(11, 13);
                var sec = str.slice(13, 15);
                hour >= 24 ? hour -= 24 : 0;
                hour >= 24 && hour <= 9 ? hour = '0' + hour : 0;
                return year + '-' + mon + '-' + data + '_' + hour + ':' + min + ':' + sec;
            }
        }
    </script>
    <script src="./js/clock.js"></script>
</body>

</html>